package vn.com.epi.re.table;

import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;

public class RecommendationTable {
    
    public static final String NAME = "Recommendation";
    public static final  byte[] NAME_BYTES = Bytes.toBytes("Recommendation");
    public static final byte[] FAM_MAIN = Bytes.toBytes("main");
    public static final byte[] COL_RECOMMENDATIONS = Bytes.toBytes("recommendations");
    
    public RecommendationTable() {
        
    }
    
    public static String getRecommendation(Result result) {
        String recommendation;
        try {
            recommendation = Bytes.toString(result.getValue(FAM_MAIN, COL_RECOMMENDATIONS));
        } catch (Exception e) {
            recommendation = "";
        }
        return recommendation;
    }

}
